HideUnmatched: <Switch @bind-Value="hideUnmatched"></Switch>
<br/>
<div>
    <Search @bind-Value="@searchKey" Placeholder="Search.." BindOnInput/>
    <Tree ShowIcon
          SearchValue="@searchKey"
          MatchedClass="site-tree-search-value"
          HideUnmatched="hideUnmatched"
          DataSource="datas"
          TitleExpression="x => x.DataItem.Title"
          ChildrenExpression="x => x.DataItem.Children">
      </Tree>
</div>

<style>
    .site-tree-search-value {
        color: #f50;
    }
</style>

@code {
    string searchKey;
    bool hideUnmatched;

    List<Data> datas = new List<Data>()
    {
        new("0-0","0-0")
        {
            Children = new()
            {
                new("0-0-0", "0-0-0")
                {
                    Children = new()
                    {
                        new("0-0-0-0", "0-0-0-0"),
                        new("0-0-0-1", "0-0-0-1"),
                        new("0-0-0-2", "0-0-0-2"),
                    }
                },
                new("0-0-1","0-0-1")
                {
                    Children = new()
                    {
                        new("0-0-1-0", "0-0-1-0"),
                        new("0-0-1-1", "0-0-1-1"),
                        new("0-0-1-2", "0-0-1-2"),
                    }
                },
                new("0-0-2","0-0-2"),
            }
        },
        new("0-1","0-1")
        {
            Children = new()
            {
                new("0-1-0", "0-1-0")
                {
                    Children = new()
                    {
                        new("0-1-0-0","0-1-0-0"),
                        new("0-1-0-1","0-1-0-1"),
                        new("0-1-0-2","0-1-0-2"),
                    },
                },
                new ("0-1-1","0-1-1")
                {
                    Children = new()
                    {
                        new("0-1-1-0","0-1-1-0"),
                        new("0-1-1-1","0-1-1-1"),
                        new("0-1-1-2","0-1-1-2"),
                    },
                },
                new("0-1-2","0-1-2"),
            }
        },
        new("0-2","0-2"),
    };

    private record Data(string Id, string Title)
    {
        public List<Data> Children { get; set; } = new List<Data>();
    }
}


